#include <debug.h>
#include <stdarg.h>
#include <stdio.h>
#include <printk.h>

static char *logLevel[] = {"Debug", "INFO", "WARN", "ERROR"};
static char buf[PRINT_BUF_LENGTH];

void Debugk(u32 level, char *file, int line, const char *fmt, ...)
{
    va_list args;
    va_start(args, fmt);
    vsprintf(buf, fmt, args);
    printk("[%s][%s:%d]%s\n", logLevel[level], file, line, buf);
}
